package tpase.GlobalServer.Service.Impl;

import tpase.GlobalServer.DO.GroupGenerator;
import tpase.GlobalServer.DO.PublicCommitment;
import tpase.GlobalServer.DO.PublicParam;
import tpase.GlobalServer.DO.PublicParameter;
import tpase.GlobalServer.Service.GlobalServerService;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class GlobalServerServiceImpl implements GlobalServerService {
    @Override
    public void storePublicParameter(PublicParameter publicParameter) {
        publicParameterDao.clearPublicParameter();
        publicParameterDao.storePublicParameter(publicParameter);
    }

    @Override
    public void storeGroupGenerator(List<GroupGenerator> groupGeneratorList) {
        groupGeneratorDao.clearGroupGenerator();
        groupGeneratorDao.storeGroupGenerator(groupGeneratorList);
    }

    @Override
    public void storePublicCommitment(List<PublicCommitment> publicCommitmentList) {
        publicCommitmentDao.clearPublicCommitment();
        publicCommitmentDao.storePublicCommitment(publicCommitmentList);
    }

    @Override
    public List<GroupGenerator> getGroupGenerator() {
        return groupGeneratorDao.getGroupGenerator();
    }

    @Override
    public List<PublicCommitment> getPublicCommitment() {
        return publicCommitmentDao.getPublicCommitment();
    }

    @Override
    public PublicParameter getPublicParameter() {
        return publicParameterDao.getPublicParameter();
    }
}
